package com.hzm.controller;

import com.hzm.entity.Teacher;
import com.hzm.service.TeacherService;
import com.hzm.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: qy137-java
 * @description:
 * @author: 皇子明
 * @create: 2021-10-22 09:53
 **/
@RestController
@RequestMapping("/order/teacher")
@Api(tags = "讲师详情")
public class TeacherController {
    @Autowired
    private TeacherService teacherService;
    @ApiOperation("讲师详情查询模块")
    @PostMapping("/queryAllTeacherBYTeacherName/{teacherName}")
    public Result queryAllTeacherBYTeacherName(@PathVariable("teacherName") @RequestBody String teacherName){
        Result result = teacherService.queryAllTeacherBYTeacherName(teacherName);
        return result;
    }
    @ApiOperation("根据手机号查询讲师信息")
    @GetMapping("/findTeacherBYMobile/{mobile}")
    public Result findTeacherBYMobile(@PathVariable("mobile") String mobile){
        return teacherService.findTeacherBYMobile(mobile);
    }
    @ApiOperation("修改讲师信息")
    @PostMapping("/updateTeacherBYMobile")
    public Result updateTeacherBYMobile(@RequestBody Teacher teacher){
        return teacherService.updateTeacherBYMobile(teacher);
    }
}


























